package com.zc.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zc.blog.mapper.CommentMapper;
import com.zc.blog.model.Comment;
import com.zc.blog.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户Service实现类
 */
@Service("CommentService")
public class ICommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements ICommentService {

    @Autowired
    private CommentMapper commentMapper;


    @Override
    public Comment findById(Integer id) {
        return commentMapper.findById(id);
    }

    @Override
    public List<Comment> findCommentByArticleId(Integer articleId) {
        return commentMapper.findCommentByArticleId(articleId);
    }
}
